package com.missilike.core.result;

/**
 *
 * !!! important !!!
 * 0和90000-99999 已在基础码中使用请不要重复应用
 */
public enum BizResultCode implements ResultCode {

    SEND_VERIFICATION_CODE_FAIL(22001, "验证码发送失败"),

    VERIFICATION_CODE_CHECK_FAIL(22002, "验证码校验失败"),

    PARENT_ID_IS_NO_EQUAL_SELF(22003,"父级id不能等于自己"),

    VERIFICATION_CODE_ERROR(22004, "验证码错误"),

    ARTICLE_CONTENT_EXISTENT(22005, "文章内容不存在"),

    PUSH_ALL_MASSAGE_ERROR(22006,"消息推送失败"),

    INVALID_TOKEN(80000, "无效用户Token值"),

    ACCOUNT_PASSWORD_ERROR(80001, "用户名或密码不正确"),

    UNAUTHORIZE_ERROR(80002, "未授权"),

    ACCOUNT_ALREADY_XIST(80003, "该用户已存在"),

    NO_ACCOUNT(80004, "用户不存在"),

    ACCOUNT_INSUFFICIENT_BALANCE(80005, "糜金不够,请充值"),

    ACCOUNT_ARTICLE_NO_EXIST(80006, "文章不存在"),

    NO_THIRD(80007, "该用户暂未绑定第三方账号"),

    BLACKLIST_RELATIONSHIP(80008, "黑名单关系"),

    NO_FRIENDS(80009, "找不到好友关系记录"),

    EXPERIENCE_NOT_NULL(80010, "积分不能为空"),

    EXIST_THIRD_ID(80011, "该用户已绑定第三方账号"),

    NO_ALIPAY_ACCOUNT(80011, "该用户暂未绑定支付宝账号");
    /**
     * 错误码
     */
    private int code;

    /**
     * 错误信息
     */
    private String msg;

    /**
     * 构造函数
     *
     * @param code 错误码
     * @param msg  错误信息
     */
    BizResultCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }


    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }
}
